package com.unittec.zk.provider.root;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;

/**
 * @author: trace
 * @date: 2019-06-11.
 * @Description:
 * @Email: tracenet@126.com
 */
@Data
public class EntityRoot implements Serializable {

    private static final long serialVersionUID = -7872003172418460929L;

    /**
     * 主键id
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 应用id
     */
    @TableField(value = "app_id", fill = FieldFill.DEFAULT)
    private String appId;

    /**
     * 租户id
     */
    @TableField(value = "tenant_id", fill = FieldFill.DEFAULT)
    private String tenantId;

    /**
     * 创建者
     */
    @TableField(value = "create_user", fill = FieldFill.INSERT)
    private String createUser;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 修改者
     */
    @TableField(value = "modify_user", fill = FieldFill.UPDATE)
    private String modifyUser;

    /**
     * 修改时间
     */
    @TableField(value = "modify_time", fill = FieldFill.UPDATE)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
}
